package SingletonPattern;

public class TickerMaker {
    private int ticket;
    private static TickerMaker tickerMaker=new TickerMaker(1000);
    public int getNextTicketNumber(){
        return ticket++;
    }

    private TickerMaker(int ticket) {
        this.ticket = ticket;
    }
    public static TickerMaker getInstance(){
        return tickerMaker;
    }
}
